package com.java.exer1;

import org.junit.Test;

/**
 * @author shkstart
 * @create 2021-01-06 21:07
 */
public class StringBufferIDEATest {
    @Test
    public void test1() {
        String s1 = null;
        StringBuffer s2 = new StringBuffer();
        s2.append(s1);


        System.out.println(s2.length());    //0
        System.out.println(s2);             //null

        StringBuffer s3 = new StringBuffer(s1);
        System.out.println(s3);             //地址值 或 null
    }
}
